package com.fs.iot.bean.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 历史数据聚合查询对象
 * @author Coder Generator 2025-03-22 20:51:27 
 **/
@Data
public class DeviceHistoryDataAggQuery {
    @NotEmpty
    private String deviceCode;

    @NotEmpty
    private String paramCode;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    /**
     * 聚合类型,max/min/avg/sum/first/last
     */
    @NotBlank
    private String aggType;

    @NotBlank
    private String interval;

    private String fill;
}